
import static java.lang.System.out;
import com.ibatis.dao.client.DaoManager;
import kmdigit.shop.dao.DaoConfig;
import kmdigit.shop.dao.domain.Category;
import kmdigit.shop.dao.domain.Item;
import kmdigit.shop.dao.domain.Product;
import kmdigit.shop.dao.persistence.CategoryDao;
import kmdigit.shop.dao.persistence.ItemDao;
import kmdigit.shop.dao.persistence.ProductDao;


public class DaoMain {
	public static void main(String[] args) 
	{
		DaoConfig daoConfig = DaoConfig.getDaoConfig();
		CategoryDao categoryDao = (CategoryDao)daoConfig.getDaoManager().getDao(CategoryDao.class);
		ItemDao itemDao = (ItemDao)daoConfig.getDaoManager().getDao(ItemDao.class);
		ProductDao productDao = (ProductDao)daoConfig.getDaoManager().getDao(ProductDao.class);
		
		Category category = categoryDao.getById("TEEN");
		out.println(category.getCategoryid());
		Item item = itemDao.getById("007-PS2");
		out.println(item.getItemid());
		Product product = productDao.getById("AA-01");
		out.println(product.getProductid());
	}
}
